﻿using mars_client.csharp;
using mars_client.csharp.enums;
using mars_client.csharp.model;
using mars_client.csharp.model.vo;
using mars_client.csharp.radar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace mars_client.gui.window
{
    /// <summary>
    /// addFriendWindow.xaml 的交互逻辑
    /// </summary>
    public partial class AddFriendWindow : Window
    {
        public AddFriendWindow()
        {
            InitializeComponent();
            GuiCache guic = GuiCache.Instance;
            guic.setGui("AddFriendWindow", this);
        }

        private void Image_MouseUp(object sender, MouseButtonEventArgs e)
        {
            this.Close();
        }
        public void DragWindow(object sender, MouseButtonEventArgs args)
        {
            this.DragMove();
        }
        private void TextBlock_MouseUp(object sender, MouseButtonEventArgs e)
        {
            MessageCO messageCO = new MessageCO();
            messageCO.type = (int)RequestEnum.request.FindUser;

            UserVO userVO = new UserVO();
            userVO.nickName = nickName.Text;
            messageCO.content = userVO;

            Radar.Instance.sendData(messageCO);
            
        }
    }
}
